<template>
  <div>
    <h2>Text组件</h2>
    <p ref="abc">MyTest中的p标签</p>
    <button @click="getP">获取p</button>
  </div>
</template>

<script>
export default {
  methods:{
    getP(){
      // const res = document.querySelector('p')
      const res = this.$refs.abc
      console.log(res.innerHTML);
    },
    show(){
      console.log(123);
    }
  }
}
</script>

<style>

</style>